package com.leadingsoft.pwxk.converter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.ProductMaterialInfoDto;
import com.leadingsoft.pwxk.model.ProductMaterialInfo;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class ProductMaterialInfoConverter extends AbstractConverter<ProductMaterialInfo, ProductMaterialInfoDto> {

	@Autowired
	MaterialConverter materialConverter;
	@Override
	protected ProductMaterialInfoDto toDtoActual(ProductMaterialInfo model) {

		ProductMaterialInfoDto dto = new ProductMaterialInfoDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());
		dto.setHyname(model.getHyname());
		dto.setMaterialList(materialConverter.toDto(model.getMaterialList()));

		
		return dto;
	}

	@Override
	public void copyProperties(ProductMaterialInfo model, ProductMaterialInfoDto dto) {

	}

}
